package com.vondear.rxui.view.dialog;

import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.vondear.rxui.R;


/**
 *
 * @date 2016/7/19
 * 确认 取消 Dialog
 */
public class RxDialogSex extends RxDialog {

    private TextView manTv;
    private TextView womanTv;

    public RxDialogSex(Context context, int themeResId) {
        super(context, themeResId);
        initView();
    }

    public RxDialogSex(Context context, boolean cancelable, OnCancelListener cancelListener) {
        super(context, cancelable, cancelListener);
        initView();
    }

    public RxDialogSex(Context context) {
        super(context);
        initView();
    }

    public RxDialogSex(Activity context) {
        super(context);
        initView();
    }

    public RxDialogSex(Context context, float alpha, int gravity) {
        super(context, alpha, gravity);
        initView();
    }

    public void setManListener(View.OnClickListener sureListener) {
        manTv.setOnClickListener(sureListener);
    }

    public void setWoManListener(View.OnClickListener cancelListener) {
        womanTv.setOnClickListener(cancelListener);
    }

    private void initView() {
        View dialogView = LayoutInflater.from(getContext()).inflate(R.layout.dialog_picker_sex, null);
        manTv = dialogView.findViewById(R.id.manTv);
        womanTv = dialogView.findViewById(R.id.womanTv);
        setContentView(dialogView);
    }
}
